// 广告
import { AdvertListDataParams, AdvertListDataResultModel } from './model'
import { defHttp } from '/@/utils/http/axios'
import { ErrorMessageMode } from '/@/utils/http/axios/types'

enum Api {
    listData = '/admin/advert/listData',
}

/**
 * @description: 获取广告列表
 */
export function advertListDataApi(params: AdvertListDataParams, mode: ErrorMessageMode = 'modal') {
    return defHttp.request<AdvertListDataResultModel>(
        {
            url: Api.listData,
            method: 'POST',
            params,
        },
        {
            errorMessageMode: mode,
        }
    )
}
